package com.ruicar.afs.cloud.manage.common.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ruicar.afs.cloud.common.core.entity.BaseEntity;
import com.ruicar.afs.cloud.common.modules.contract.enums.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @author: Lee
 * @date 2020-05-30 09:21:16 
 * @description 撤销收款处理信息表
 */
@Data
@Accessors(chain = true)
@TableName(value ="manage_revoke_handle", autoResultMap = true)
public class ManageRevokeHandle extends BaseEntity<ManageRevokeHandle> {
	@ApiModelProperty("申请编号")
	private String applyNo;
	@ApiModelProperty("收据id")
	@JsonSerialize(using = ToStringSerializer.class)
	private Long receiptId;
	@ApiModelProperty("业务类型")
	private BusinessTypeEnum businessType;
	@ApiModelProperty("案件编号")
	private String caseNo;
	@ApiModelProperty("收款来源类型 枚举值：对公结算，微信还款，银行代扣")
	private ReceiptSourceTypeEnum sourceType;
	@ApiModelProperty("案件类型")
	private CaseTypeEnum caseType;
	@ApiModelProperty("客户姓名")
	private String custName;
	@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	@ApiModelProperty("案件发起时间")
	private Date startTime;
	@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	@ApiModelProperty("案件结束时间")
	private Date endTime;
	/** 合同号 */
	@ApiModelProperty("合同号")
	private String contractNo;
	@ApiModelProperty("收款金额")
	private BigDecimal arriveAmt;
	@ApiModelProperty("退款银行")
	private String refundBankCode;
	@ApiModelProperty("付款方式")
	private String termsPayment;
	@ApiModelProperty("处理方式")
	private TreatmentMethodEnum treatmentMethod;
	@ApiModelProperty("支付至")
	private String payer;
	@ApiModelProperty("退款账户")
	private String refundAccount;
	@ApiModelProperty("分支行")
	private String branchBank;
	@ApiModelProperty("联行号")
	private String bankNo;
	@ApiModelProperty("收据撤销信息id")
	@JsonSerialize(
			using = ToStringSerializer.class
	)
	private Long revokeId;
	@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ApiModelProperty("收款成功时间")
	private Date succeedTime;
	@ApiModelProperty("联系方式")
	private String phone;
	@ApiModelProperty("案件状态 枚举值：撤销未发起，撤销审核中，撤销审核通过，撤销审核拒绝")
	@TableField(exist = false)
	private CaseStatusEnum caseStatus;
	private ProcessStatusEnum processStatus ;
	@ApiModelProperty("处理人员")
	@TableField(exist = false)
	private String processPerson;
	@ApiModelProperty("部门")
	@TableField(exist = false)
	private String department;
	@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ApiModelProperty("结束时间 案件审批完成时间")
	@JSONField(format="yyyy-MM-dd HH:mm:ss")
	@TableField(exist = false)
	private Date endDate;

}
